import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewEncapsulation, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { gsap } from 'gsap';
import { OrgNode } from '../../types';
@Component({
  selector: 'app-person-card',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './card.html',
  styleUrl: './style.scss',
  changeDetection: ChangeDetectionStrategy.OnPush,
  encapsulation: ViewEncapsulation.None
})
export class PersonCardComponent {
  @Input({ required: true }) person!: OrgNode;
  readonly host = inject(ElementRef);

  /* ngAfterViewInit() {
    const { nativeElement } = this.host;
    if (nativeElement) {
      gsap.fromTo(nativeElement, { opacity: 0, scale: 0 }, { opacity: 1, scale: 1, duration: 0.5, ease: "back.out(1.7)" });
    }
  } */
}
